<script setup>
// 不需要导入HelloWorld组件
</script>

<template>
  <div class="app-container">
    <!-- 顶部导航栏 -->
    <header class="app-header">
      <h1 class="app-title">教师备课平台</h1>
      <nav class="main-nav">
        <router-link to="/home">首页</router-link>
        <router-link to="/function">功能中心</router-link>
        <router-link to="/design">教学设计</router-link>
        <router-link to="/ppt">PPT生成</router-link>
        <router-link to="/media">多媒体资源</router-link>
        <router-link to="/exercise">练习题</router-link>
        <router-link to="/paper">试卷</router-link>
        <router-link to="/custom">个性化定制</router-link>
        <router-link to="/feedback">反馈优化</router-link>
        <router-link to="/mine">我的</router-link>
      </nav>
    </header>
    
    <!-- 主内容区域 - 路由视图 -->
    <main class="app-main">
      <router-view></router-view>
    </main>
    
    <!-- 底部版权信息 -->
    <footer class="app-footer">
      <p>© 2023 教师备课平台 - 基于Coze智能体技术</p>
    </footer>
  </div>
</template>

<style>
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-header {
  background-color: #4CAF50;
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-title {
  margin: 0;
  font-size: 1.5rem;
}

.main-nav {
  display: flex;
  gap: 1rem;
}

.main-nav a {
  color: white;
  text-decoration: none;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.main-nav a:hover,
.main-nav a.router-link-active {
  background-color: rgba(255, 255, 255, 0.2);
}

.app-main {
  flex: 1;
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.app-footer {
  background-color: #f5f5f5;
  padding: 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: #666;
}

@media (max-width: 768px) {
  .app-header {
    flex-direction: column;
    gap: 1rem;
  }
  
  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .app-main {
    padding: 0.5rem;
  }
}
</style>
